package com.mo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class ProvideService {
    @Value("${spring.cloud.client.ip-address}")
    private String ip;
    @Value("${server.port}")
    private String port;


    @RequestMapping("/pro")
    public Map getI() throws InterruptedException {
        Map<String, String> map = new HashMap<>();
        map.put("first","name");
        map.put(ip,port);
        //Thread.sleep(2000);
        return map;
    }


}
